//
//  MHDiskCacheTool.h
//  cacheTool
//
//  Created by 牟华 on 16/10/27.
//  Copyright © 2016年 牟华. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef void(^saveCompleteHandler)();

UIKIT_EXTERN NSString * const kMHObjectCache;
UIKIT_EXTERN NSString * const kMHImageCache;
UIKIT_EXTERN NSString * const DMHOtherDataCache;

UIKIT_EXTERN NSString * const kMHDefaultCacheName;
UIKIT_EXTERN NSString * const kMHCachePrex;
UIKIT_EXTERN NSString * const DMHIOQueueName;

@interface MHDiskCacheTool : NSObject

/**
 *  缓存文件
 */
- (void)cacheWithKey:(NSString *)key value:(id)value image:(UIImage *)image data:(NSData *)otherData completeHandler:(saveCompleteHandler)completeHandler;

/**
 *  获取缓存文件
 */
-(void)getWithKey:(NSString *)key objectGetHandler:(void(^)(id value))completeObj imageGetHandler:(void(^)(UIImage *image))completeImage otherDataGetHandler:(void(^)(NSData *data))completeOtherData;

/**
 *  实例化对象缓存工具
 */
+ (instancetype)sharedCacheObj;
/**
 *  实例化图片缓存工具
 */
+ (instancetype)sharedCacheImage;
/**
 *  实例化其他data缓存工具
 */
+ (instancetype)sharedCacheOtherData;
/**
 *  清除缓存文件
 */
+ (void)clearDisk;
@end
